package com.pp.ent.db;

/**
 * Created by dengqu on 2017/2/24.
 */

public class DbResult<T>
{
    public ResultCode result;
    public T data;

    public static enum ResultCode
    {
        Successful,  Failed;

        private ResultCode() {}
    }

    public DbResult()
    {
        this.result = ResultCode.Successful;
    }

    public DbResult(ResultCode result, T data)
    {
        this.result = result;
        this.data = data;
    }

    public boolean isSuccessful()
    {
        return this.result == ResultCode.Successful;
    }
}
